.DayTimeGridContainer {
  --fixed-cell-width: 68px;
  --hour-height: 46px;
  --has-scroll: 1;

  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-4);
  max-height: 100%;
}

.DayTimeGridRoot {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
}

.DayTimeGridHeader {
  display: flex;
  flex-direction: column;
}

.DayTimeGridGridRow {
  display: grid;
  grid-template-columns: minmax(var(--fixed-cell-width), auto) repeat(auto-fit, minmax(0, 1fr));
  width: 100%;
}

.DayTimeGridHeaderRow {
  border-bottom: 1px solid var(--border-color);
}

.DayTimeGridHeader[style*='--has-scroll: 1'] .DayTimeGridHeaderRow {
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-color: transparent transparent;
}

.DayTimeGridAllDayEventsRow {
  position: relative;
  background-color: transparent;
  display: grid;
  grid-template-columns: repeat(var(--column-count), minmax(0, 1fr));
  grid-template-rows: 1fr auto;
  width: 100%;
  height: 100%;
  > *:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

.DayTimeGridAllDayEventsGrid {
  border-bottom: 1px solid var(--border-color);
  grid-template-columns: var(--fixed-cell-width) minmax(0, 1fr) fit-content(100%);
}

.DayTimeGridAllDayEventsGrid[style*='--has-scroll: 1'] .ScrollablePlaceholder {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  height: 100%;
  scrollbar-color: var(--weekend-background) var(--weekend-background);
}

.DayTimeGridAllDayEventsCell {
  padding: var(--space-1);
  background-color: var(--surface);
}

.DayTimeGridAllDayEventsCellEvents {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  /* Setting the row heights to 18px here to make sure that even empty rows have the exact height of an all day event */
  grid-template-rows: repeat(var(--row-count), minmax(auto, 18px));
  gap: var(--space-1);
}

.DayTimeGridAllDayEventsGrid[data-weekend][style*='--has-scroll: 1'] .ScrollablePlaceholder {
  scrollbar-color: var(--weekend-background) var(--weekend-background);
}
/* Webkit (Chrome, Safari, Edge) */
.DayTimeGridAllDayEventsGrid[style*='--has-scroll: 1'] .ScrollablePlaceholder::-webkit-scrollbar {
  background: transparent;
}

.DayTimeGridAllDayEventsGrid[data-weekend][style*='--has-scroll: 1']
  .ScrollablePlaceholder::-webkit-scrollbar {
  background: var(--weekend-background);
}

.DayTimeGridHeaderContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: 10px;
}

.DayTimeGridHeaderButton {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.DayTimeGridHeaderButton:focus-visible {
  outline: var(--outline-focus);
  outline-offset: -2px;
  border-radius: var(--radius-3);
}

.DayTimeGridAllDayEventsHeaderCell {
  font-size: var(--font-size-1);
  font-style: var(--em-font-style);
  padding: var(--space-2);
  text-align: end;
  color: var(--secondary-text-color);
  border-right: 1px solid var(--border-color);
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.DayTimeGridHeaderDayName {
  font-size: var(--font-size-2);
  color: var(--secondary-text-color);
  line-height: 1;
}

.DayTimeGridHeaderDayNumber {
  font-size: var(--font-size-5);
  font-weight: var(--font-weight-3);
  line-height: 1;
  padding: 0 var(--space-1);
  border-radius: var(--radius-3);
}

[data-current] .DayTimeGridHeaderDayNumber {
  background-color: var(--primary-3);
}

.DayTimeGridBody {
  flex: 1;
  height: 100%;
}

.DayTimeGridScrollableContent {
  display: flex;
  height: calc(var(--hour-height) * 24);
  position: relative;
  overflow: auto;
}

.DayTimeGridTimeAxis {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: var(--fixed-cell-width);
}

.DayTimeGridTimeAxisCell {
  height: calc(100% / 24);
  line-height: calc(100% / 24);
  border-right: 1px solid var(--border-color);
  padding-inline: var(--space-2);
  text-align: end;
}

.DayTimeGridTimeAxisText.HiddenHourLabel {
  opacity: 0;
}

.DayTimeGridTimeAxisText:not(:empty) {
  font-size: var(--font-size-1);
  line-height: calc(100% / 24);
  color: var(--secondary-text-color);
  white-space: nowrap;
}

.DayTimeGridTimeAxisCell:not(:first-child)::after {
  content: '';
  position: absolute;
  left: var(--fixed-cell-width);
  right: 0;
  border-bottom: 1px solid var(--border-color);
  top: calc(var(--hour) * var(--hour-height));
  z-index: 1;
}

.DayTimeGridGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  width: 100%;

  > *:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

.DayTimeGridColumn {
  display: flex;
  flex-direction: column;
}

.DayTimeGridColumn[data-weekend],
.DayTimeGridAllDayEventsCell[data-weekend] {
  background: var(--weekend-background);
}

.DayTimeGridColumnInteractiveLayer {
  position: relative;
  flex: 1;
}

.DayTimeGridCurrentTimeIndicator {
  position: absolute;
  left: -2px;
  right: -2px;
  top: var(--y-position);
  height: 1px;
  background-color: var(--primary-8);
  z-index: 2;
}

.DayTimeGridColumn:last-child .DayTimeGridCurrentTimeIndicator {
  right: 0;
}

.DayTimeGridColumn:first-child .DayTimeGridCurrentTimeIndicator {
  left: -6px;
}

.DayTimeGridColumn[data-current] .DayTimeGridCurrentTimeIndicator {
  height: 2px;
  right: 1px;
  background-color: var(--primary-10);
  z-index: 3;
  margin: -0.5px;
}

.DayTimeGridCurrentTimeLabel {
  position: absolute;
  transform: translate(calc(-100%), -50%);
  padding: 0 2px;
  background-color: var(--primary-10);
  color: var(--primary-1);
  border-radius: var(--radius-3);
  font-size: var(--font-size-1);
  line-height: var(--line-height-1);
  white-space: nowrap;
}

.DayTimeGridAllDayEventContainer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr;
  /* Setting the row heights to 18px here to make sure that even empty rows have the exact height of an all day event */
  grid-template-rows: repeat(var(--row-count), minmax(auto, 18px));
  gap: var(--space-1);
}
